from   setuptools import setup,find_packages


setup(
    # 安装卸载信息名称(不区分大小写):LibJPF-0.0.1.dist-info,
    name="LibJPF",
    version="0.0.5",
    description="JianPF_Python_cv2_LibTool2024",
    packages=find_packages(),
    # py_modules=["JTool","JToolCV2"]
)

# print(find_packages())

# # 0.目录名区分大小写(import 目录名) ,在要打包的文件,所在目录必须创建空的__init__.py文件
# 给find_packages()函数链式查找使用

# # 1.打包前把setup.py文件复制到(__init__.py和JTOOL.py的)目录上级
# (上级如果有其他功能目录不一起要打包的目录,就删除功能目录下的__init__.py)
# #如果不需要import 导入,py_modules的模块写上(代码也放上级目录)

# # 2.打包指定packages和py_modules(没指定的不打包)到setup.py目录下的dist目录下.tag文件
# # 在(__init__.py和JTOOL.py的)上级目录执行命令:(这里的sdist是打包命令,不是目录)
# # python setup.py sdist

# # 在(__init__.py和JTOOL.py的)上级目录会生成*egg-info目录和dist目录,dist目录下是打包后的压缩包

# # 3.0 压缩包安装方式(进入dist目录下有一个LibJPF-0.0.2.tar.gz文件,直接安装)
# # pip install dist/.tag

# # 3.1目录安装方式(省略打包成文件步骤)(.代表(__init__.py和JTOOL.py的)上级目录的setup.py文件)
# # 安装解压包(注意py_modules的模块文件直接放包目录同级下)
# # pip install .
# # 

# # 4.删除临时创建目录 rd= rmdir /s /q build *egg-info

# # 5. 显示包表
# # pip list

# # 7. 删除指定包
# # pip uninstall JPFLib

# # 9. 虚拟空间vv(必须执行Scripts目录中激活activate.bat或deactivate.bat)
# # python -m venv vv



# gitee 中有一个https://gitee.com/jianpf/python_-lfzl.git仓库,如何用pip命令安装这个仓库?
# pip install git+https://gitee.com/jianpf/python_-lfzl.git 
# 这个命令会自动下载仓库中的setup.py文件,然后安装.

# 测试安装成功:pip install git+https://gitee.com/jianpf/python_-lfzl.git
# C:\Users\HF_MOV\Documents\LFWG_Python\PyLfzl\lib>pip install git+https://gitee.com/jianpf/python_-lfzl.git
# Collecting git+https://gitee.com/jianpf/python_-lfzl.git
#   Cloning https://gitee.com/jianpf/python_-lfzl.git to c:\users\hf_mov\appdata\local\temp\pip-req-build-zx92y89_
#   Running command git clone --filter=blob:none --quiet https://gitee.com/jianpf/python_-lfzl.git 'C:\Users\HF_MOV\AppData\Local\Temp\pip-req-build-zx92y89_'
#   Resolved https://gitee.com/jianpf/python_-lfzl.git to commit b5db8fa1f3e38bb12fe79f54f6be92e76f1a4ea5
#   Installing build dependencies ... done
#   Getting requirements to build wheel ... done
#   Preparing metadata (pyproject.toml) ... done
# Building wheels for collected packages: LibJPF
#   Building wheel for LibJPF (pyproject.toml) ... done
#   Created wheel for LibJPF: filename=libjpf-0.0.1-py3-none-any.whl size=16415 sha256=2cfeaa29437166a6b793de6426604137f757b839a639369c8a6621da28fdc556
#   Stored in directory: C:\Users\HF_MOV\AppData\Local\Temp\pip-ephem-wheel-cache-vnx5od7k\wheels\6e\30\0e\e2eff3bfa20e9e7c758d5c65b68a613f7b52f9fc38664ade7c
# Successfully built LibJPF
# Installing collected packages: LibJPF
# Successfully installed LibJPF-0.0.1

# [notice] A new release of pip is available: 25.1 -> 25.1.1
# [notice] To update, run: python.exe -m pip install --upgrade pip

# 验证安装成功:pip list
# LibJPF             0.0.1